<template>
    <div class="follow">
        <div class="one"><span>{{postdata.create_date.split('T')[0]}}</span> <span>{{postdata.create_date.split('T')[1].split('.')[0]}}</span> </div>
        <div class="parent" v-if="postdata.parent">
            <div class="par">回复:  {{postdata.parent.user.nickname}}</div>
            <div class="tit">{{postdata.parent.content}}</div>
        </div>  
        <div class="two"><p>{{postdata.content}}</p></div>
        <div class="three"> <p>{{postdata.post.title}}</p> <span class="iconfont iconjiantou1" @click="$router.push('/postdetail/'+ postdata.post.id)"></span> </div>
    </div>
</template>

<script>
export default {
    props:['postdata']
}
</script>

<style lang="less" scoped>
   .follow{   //跟帖组件
           display: flex;
           flex-direction:column;
           padding: 13/360*100vw;
           border-bottom: solid 1px #8f8f88;
           .one{
               color: #afafaf;
               font-size: 15/360*100vw;
           }
           .three{
               display: flex;
               color: #8f8d8d;
               font-size: 13.5/360*100vw;
               p{
                   flex: 1;
                   //多出省略号显示
                   white-space: nowrap;
                   text-overflow: ellipsis;
                   overflow: hidden;
               }
           }
           div{
               margin: 6/360*100vw;
           }
           .parent{
               padding: 10/360*100vw;
               background: #dddddd;
               .par{
                   color: #9e9898;
               }
           }
       }
</style>